<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of QueryResult
 *
 * @author QuangKhoi
 */
class QueryResult {
    private $dbReturn;
    private $returnCode = 0;
    private $returnMessage = "";
    private $numRows = 0;
    private $dataTable;
    
    public function __set($name, $value) {
        if ($name == "dbReturn") {
            $this->dbReturn = $value;
            $this->dataTable = new DataTable($value);
        }
        elseif ($name == "returnCode") {
            $this->returnCode = $value;
        }
        elseif ($name == "returnMessage") {
            $this->returnMessage = $value;
        }
        elseif ($name = "numRows") {
            $this->numRows = $value;
        }
            return null;
    }
    
    public function __get($name) {
        return $this->$name;
    }
}

?>
